## curlplusplus:
## A c++ wrapper around libcurl

## Place generated object files (.o) into the same directory as their source
## files, in order to avoid collisions when non-recursive make is used.
AUTOMAKE_OPTIONS = subdir-objects

## Additional flags to pass to aclocal when it is invoked automatically at
## make time. The ${ACLOCAL_FLAGS} variable is picked up from the environment
## to provide a way for the user to supply additional arguments.
ACLOCAL_AMFLAGS = ${ACLOCAL_FLAGS} -I m4

## Define a libtool archive target "libexample-@EXAMPLE_API_VERSION@.la", with
## @EXAMPLE_API_VERSION@ substituted into the generated Makefile at configure
## time.
## The libtool archive file (.la) will be installed into the directory named
## by the predefined variable $(bindir), along with the actual shared library
## file (.so).
lib_LTLIBRARIES = libcurlplusplus-@CURLPLUSPLUS_API_VERSION@.la

libcurlplusplus_@CURLPLUSPLUS_API_VERSION@_la_CPPFLAGS = $(DEPS_CFLAGS)
libcurlplusplus_@CURLPLUSPLUS_API_VERSION@_la_LIBADD = $(DEPS_LIBS)

libcurlplusplus_@CURLPLUSPLUS_API_VERSION@_la_SOURCES = include/curlplusplus/curlpp.hpp src/curlpp.cpp \
											  			include/curlplusplus/easy.hpp src/easy.cpp \
											  			include/curlplusplus/multi.hpp src/multi.cpp \
						  					  			include/curlplusplus/share.hpp src/share.cpp \
						  					  			include/curlplusplus/slist.hpp src/slist.cpp

## Instruct libtool to include ABI version information in the generated shared
## library file (.so).  The library ABI version is defined in configure.ac, so
## that all version information is kept in one place.
libcurlplusplus_@CURLPLUSPLUS_API_VERSION@_la_LDFLAGS = -version-info $(CURLPLUSPLUS_SO_VERSION)

## Define the list of public header files and their install location.  The
## nobase_ prefix instructs Automake to not strip the directory part from each
## filename, in order to avoid the need to define separate file lists for each
## installation directory.  This only works if the directory hierarchy in the
## source tree matches the hierarchy at the install location, however.
curlplusplus_includedir=$(includedir)/curlplusplus-@CURLPLUSPLUS_API_VERSION@/curlplusplus
curlplusplus_include_HEADERS = include/curlplusplus/curlpp.hpp include/curlplusplus/easy.hpp \
									  include/curlplusplus/multi.hpp include/curlplusplus/share.hpp \
						    		  include/curlplusplus/slist.hpp

## The generated configuration header is installed in its own subdirectory of
## $(libdir).  The reason for this is that the configuration information put
## into this header file describes the target platform the installed library
## has been built for.  Thus the file must not be installed into a location
## intended for architecture-independent files, as defined by the Filesystem
## Hierarchy Standard (FHS).
## The nodist_ prefix instructs Automake to not generate rules for including
## the listed files in the distribution on 'make dist'.  Files that are listed
## in _HEADERS variables are normally included in the distribution, but the
## configuration header file is generated at configure time and should not be
## shipped with the source tarball.
curlplusplus_libincludedir = $(libdir)/curlplusplus-$(CURLPLUSPLUS_API_VERSION)/include
nodist_curlplusplus_libinclude_HEADERS = curlplusplusconfig.h

## Install the generated pkg-config file (.pc) into the expected location for
## architecture-dependent package configuration information.  Occasionally,
## pkg-config files are also used for architecture-independent data packages,
## in which case the correct install location would be $(datadir)/pkgconfig.
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = curlplusplus-$(CURLPLUSPLUS_API_VERSION).pc

## Define an independent executable script for inclusion in the distribution
## archive.  However, it will not be installed on an end user's system due to
## the noinst_ prefix.
dist_noinst_SCRIPTS = autogen.sh